When data packets are transmitted from a source workstation to a destination workstation over an IP data transmission network, the packets are routed from node to node in the network by a routing mechanism implemented by a router in each node of the data path.
Each IP datagram received by a node and which specifies a destination address other than the local node address is subject to the IP routing algorithm by the router of the node which selects the next node for the datagram. For this, the router uses a routing table which contains information about the other routers of its own network and about IP networks to which its own network is attached.
The routing mechanism enables the optimal routing path to be determined. Such a path determination is based on a variety of metrics or a combination of metrics, such metrics being values resulting from algorithmic computations on a particular variable or values directly input by the router administrator. The comparison of the metrics allows the router to determine the optimal routes and therefore to establish the routing table.
Many different metrics have been used in routing algorithms. Sophisticated routing algorithms can base the route selection on multiple metrics, combining them in a manner resulting in a single metric. For this, several metrics may be used. Path length is the most common metric. Some routing protocols allow the network administrator to assign arbitrary costs to each network link. In this case, the path length is the sum of the costs associated with each link traversed. Another important metric to be used is the communication cost, insofar as some companies may not care about performance whereas they care about operating expenditures. Other metrics may also be used, such as the reliability (usually described in terms of bit error rate) of each network link, delay (the time required to move a packet from a source to a destination), bandwidth (available traffic capacity of a link), or load (the degree to which a network resource such a router is busy).
All the information used by the routing protocol to determine the metrics comes from the lowest three layers of the protocol stack. It is important to note that in the internet protocols as well as in the Open System Interconnect (OSI) model, the layer which defines the packet delivery, including routing, is the third layer. Put conversely, the upper layers of the protocol stack, which constitute the layer 4/5 in the network procedures, are not used to determine metrics and therefore to build the routing table. These upper layers define the application such as the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP).
There have been several attemps to use the level 4/5 information in the routing algorithm. All these approaches were based on the assumption that the source and destination workstations provide information to the routers and support a specific protocol to set the inputs. These attempts, which focused on using level 4/5 information (for the TCP/IP model as well as for the OSI model),have been abandoned, as the did not result in stable and durable implementations. One such attempt was implemented in OSPF, using the configuration parameters called Type of Service (TOS). This mechanism requires the application to set the TOS field in all IP data generated by the source workstation. Unfortunately, the support of TOS in routing requires modifications to the application. Today, no application is implemented in such a way. Therefore, the use of the TOS field has been dropped in recent OSPF implementations according to the latest RFC recommendations. Some other attempts use a priority queue in the routers: the router tries to look at some field significant of level 4/5 application layer when receiving the IP data packets, in order to set some priority in an input/output buffer. Such a mechanism acts on the data transmission speed, but does not modify the routing path.